#用类封装MyMath


class MyMath:
    def add(self, a, b):
        return a + b

    def sub(self, a, b):
        return a - b

    def mul(self, a, b):
        return a * b

    def div(self, a, b):
        return a / b

    def exdiv(self, a, b):
        return a // b

    def rem(self, a, b):
        return a % b

    def pow(self, a, b):
        return a ** b

#创建新类
class caixi(object):
    def shangdong(self):
        print("鲁菜")
    def sichuan(self):
        print("川菜")
    def hunan(self):
        print("湘菜")
    def guangdong(self):
        print("粤菜")
    def __init__(self, name):
        self.name = name

gongbaojiding = caixi("鲁菜")
yuxiangrousi = caixi("川菜")

class beifangcaixi(caixi):
    fangwei = 'beifang'
class nanfangcaixi(caixi):
    fangwei = 'nanfang'